:root {
    --sidebar-width: 250px;
    --header-height: 60px;
    --primary-color: #2c3e50;
    --secondary-color: #3498db;
    --success-color: #2ecc71;
    --error-color: #e74c3c;
    --background-color: #f5f6fa;
    --text-color: #2c3e50;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--background-color);
    color: var(--text-color);
    line-height: 1.6;
}

.admin-container {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: var(--sidebar-width);
    background-color: var(--primary-color);
    color: white;
    padding: 20px;
    position: fixed;
    height: 100vh;
    overflow-y: auto;
}

.sidebar-header {
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    margin-bottom: 20px;
}

.sidebar-menu {
    list-style: none;
}

.sidebar-menu li {
    margin-bottom: 10px;
}

.sidebar-menu a {
    color: white;
    text-decoration: none;
    display: block;
    padding: 10px;
    border-radius: 5px;
    transition: background-color 0.3s;
}

.sidebar-menu a:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    padding: 20px;
    overflow: hidden;
}

.header {
    height: var(--header-height);
    background-color: white;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    position: fixed;
    top: 0;
    right: 0;
    left: var(--sidebar-width);
    z-index: 100;
}

.content {
    margin-top: calc(var(--header-height) + 20px);
    padding: 20px;
}

.card {
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    padding: 20px;
    margin-bottom: 20px;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid #eee;
}

.card-title {
    font-size: 1.5em;
    color: var(--primary-color);
    font-weight: 600;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 20px;
    background-color: var(--secondary-color);
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    text-decoration: none;
    font-size: 15px;
    font-weight: 500;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    gap: 8px;
}

.btn:hover {
    background-color: #2980b9;
    transform: translateY(-1px);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.15);
}

.btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.btn-success {
    background-color: var(--success-color);
}

.btn-success:hover {
    background-color: #27ae60;
}

.btn-danger {
    background-color: var(--error-color);
}

.btn-danger:hover {
    background-color: #c0392b;
}

.table {
    width: 100%;
    border-collapse: collapse;
}

.table th,
.table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

.table th {
    background-color: #f8f9fa;
    font-weight: 600;
}

.table tr:hover {
    background-color: #f8f9fa;
}

.action-buttons {
    display: flex;
    gap: 10px;
}

.form-group {
    margin-bottom: 24px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: var(--primary-color);
    font-weight: 500;
    font-size: 0.95em;
}

.form-control {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e1e1e1;
    border-radius: 6px;
    font-size: 15px;
    color: var(--text-color);
    background: #fff;
    transition: all 0.3s ease;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.form-control:hover {
    border-color: #d0d0d0;
}

.form-control:focus {
    border-color: var(--secondary-color);
    outline: none;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.15);
}

select.form-control {
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%232c3e50' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 16px;
    padding-right: 40px;
}

.input-group {
    position: relative;
    display: flex;
    align-items: stretch;
    width: 100%;
}

.input-group .form-control {
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
    border-right: none;
    flex: 1;
}

.input-group-text {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    font-size: 15px;
    color: var(--text-color);
    background-color: #f8f9fa;
    border: 2px solid #e1e1e1;
    border-left: none;
    border-radius: 0 6px 6px 0;
    font-weight: 500;
}

.form-text {
    display: block;
    margin-top: 8px;
    font-size: 0.85em;
    color: #666;
}

.error-message,
.success-message {
    padding: 14px 18px;
    border-radius: 6px;
    margin-bottom: 24px;
    font-size: 0.95em;
    display: flex;
    align-items: center;
    gap: 10px;
}

.error-message {
    background-color: #fdf0ef;
    border: 1px solid #fad7d3;
    color: var(--error-color);
}

.success-message {
    background-color: #eefaf3;
    border: 1px solid #d3f1e3;
    color: var(--success-color);
}

.form-actions {
    display: flex;
    gap: 12px;
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid #eee;
}

/* 用户信息下拉菜单样式 */
.user-info {
    position: relative;
    cursor: pointer;
    padding: 8px;
    border-radius: 4px;
    transition: background-color 0.3s;
}

.user-info:hover {
    background-color: var(--background-color);
}

.user-info::after {
    content: '';
    display: inline-block;
    width: 0;
    height: 0;
    margin-left: 8px;
    vertical-align: middle;
    border-top: 4px solid var(--text-color);
    border-right: 4px solid transparent;
    border-left: 4px solid transparent;
}

.user-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    background: white;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    min-width: 160px;
    display: none;
    z-index: 1000;
}

.user-info:hover .user-dropdown {
    display: block;
}

.user-dropdown a {
    display: block;
    padding: 10px 16px;
    color: var(--text-color);
    text-decoration: none;
    transition: background-color 0.3s;
}

.user-dropdown a:hover {
    background-color: var(--background-color);
}

.user-dropdown a:first-child {
    border-top-left-radius: 4px;
    border-top-right-radius: 4px;
}

.user-dropdown a:last-child {
    border-bottom-left-radius: 4px;
    border-bottom-right-radius: 4px;
}

.user-dropdown .divider {
    height: 1px;
    background-color: #eee;
    margin: 4px 0;
}

@media (max-width: 768px) {
    .sidebar {
        width: 0;
        padding: 0;
    }
    
    .main-content {
        margin-left: 0;
    }
    
    .header {
        left: 0;
    }

    .form-actions {
        flex-direction: column;
    }

    .btn {
        width: 100%;
    }
}
